package cn.wolfcode.wolf2w.query;

public class TravelQuery extends QueryObject{

    private String destId;
    private int dayType = -1;  //旅游天数

    private int perExpendType = -1;  //人均消费

//不明确指定，直接使用id排序
    private int orderType = -1;  //排序

    public String getDestId() {
        return destId;
    }

    public void setDestId(String destId) {
        this.destId=destId;
    }

    public int getDayType() {
        return dayType;
    }

    public void setDayType(int dayType) {
        this.dayType=dayType;
    }

    public int getPerExpendType() {
        return perExpendType;
    }

    public void setPerExpendType(int perExpendType) {
        this.perExpendType=perExpendType;
    }

    public int getOrderType() {
        return orderType;
    }

    public void setOrderType(int orderType) {
        this.orderType=orderType;
    }


    //映射转化
    //dayType =2   ---> new TravelCondition(4, 7)
    //将一个值转化为另一个值：映射思想（map）
    public TravelCondition getDay(){
        return TravelCondition.DAY_MAP.get(dayType);
    }

    public TravelCondition getPerExpend(){
        return TravelCondition.PEREXPEND_MAP.get(perExpendType);
    }

}
